package cn.wolfcode.trip.base.mapper;


import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.domain.User;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {

    int insert(User record);

    User selectByPrimaryKey(Long id);

    List<User> selectAll();

    int updateByPrimaryKey(User record);

    User selectByEmailAndPassword(@Param("email") String email, @Param("password") String password);

    List<User> queryForList(QueryObject qo);

    String selectRelation(@Param("fansId") Long fansId,@Param("attentionId") Long attentionId);

    void insertRelation(@Param("fansId") Long fansId, @Param("attentionId") Long attentionId);

    void deleteRelation(@Param("fansId") Long fansId, @Param("attentionId") Long attentionId);

    Map queryFans(Long id);

    Map queryAttention(Long id);

    String selectCollectRelation(@Param("userId") Long userId, @Param("travelId") Long travelId);

    void delectCollect(@Param("userId") Long userId, @Param("travelId") Long travelId);

    void insertCollect(@Param("userId") Long userId, @Param("travelId") Long travelId);

    List listLike(User user);

    User queryAllProducts(Long userId);

    List<Map<String,Object>> queryMyStrategy(QueryObject qo);

    String selectIsExist(@Param("userId") Long userId, @Param("strategyId") Long strategyId);

    void insertTravlList(@Param("userId") Long userId, @Param("strategyId") Long strategyId);
}